package jnpf.controller;

import jnpf.base.ActionResult;
import jnpf.model.newCreate.dto.NewCreateDTO;
import jnpf.service.NewCreateService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.PostMapping;
import org.springframework.web.bind.annotation.RequestBody;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;

@RestController
@RequestMapping("/api/bt/newCreate")
public class NewCreatedController {

    @Autowired
    private NewCreateService newCreateService;

    @PostMapping("create")
    public ActionResult newCreated(@RequestBody NewCreateDTO newCreateDTO) {
        return ActionResult.success(newCreateService.newCreated(newCreateDTO));
    }
}
